package cn.itsource.pet.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;

import java.util.ArrayList;
import java.util.List;

/**
 * 实体类：
 */
public class PetType extends BaseDomain{

    private String name;
    private String description;
    private Long parentId;
    /**
     * 父类型id
     */

    //坑：children这个单词不能乱写，必须与elementUI的上传组件中保持一致，不然前端没有数据
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<PetType> children = new ArrayList<>();


    public List<PetType> getChildren() {
        return children;
    }

    public void setChildren(List<PetType> children) {
        this.children = children;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    @Override
    public String toString() {
        return "PetType{" +
        ", name=" + name +
        ", description=" + description +
        ", parentId=" + parentId +
        "}";
    }
}
